package com.example.eurekabus.refresh;

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.io.IOException;

/**
 * 刷新svn的配置文件
 * 通过访问/bus/refresh接口，bus（总线）将消息发送给rabbitmq，rabbitmq将消息发给各个模块，逐个进行刷新
 * @author Created by yawn on 2017-11-07 16:35
 */
public class BusRefresh {

    public static void main(String[] args) throws IOException {
        CloseableHttpClient httpClient = HttpClients.createDefault();
        HttpPost post = new HttpPost("http://localhost:8084/bus/refresh");
        CloseableHttpResponse response = httpClient.execute(post);
        System.out.println(EntityUtils.toString(response.getEntity()));
    }
}
